﻿
namespace Axial
{
	public class WFStartupScript : WFScript
	{
		protected override void Render(System.Web.UI.HtmlTextWriter writer)
		{
			base.Render(writer);

			Page.ClientScript.RegisterStartupScript(Page.GetType(), MethodName + "startup", 
				"var fxn = function() { " + MethodName + "(); }; " + 
				"if (window.addEventListener) window.addEventListener('load', fxn, false); " + 
				"else if (window.attachEvent) window.attachEvent('onload', fxn);",
				true);
		}
	}
}
